package twentyThreePattern.BehaviorPattern11.mediator.section2;

public class Client {
	public static void main(String[] args) {
		AbstractMediator mediator = new ConcretMediator();
		Purchase purchase = new Purchase(mediator);
		mediator.setPurchase(purchase);
		Stock stock = new Stock(mediator);
		mediator.setStock(stock);
		Sale sale = new Sale(mediator);
		mediator.setSale(sale);
		// 采购人员采购电脑
		System.out.println("------采购人员采购电脑--------");
		purchase.buyIBMcomputer(100);

		// 销售人员销售电脑
		System.out.println("\n------销售人员销售电脑--------");
		sale.sellIBMComputer(1);

		// 库房管理人员管理库存
		System.out.println("\n------库房管理人员清库处理--------");
		stock.clearStock();
	}
}
